The code and information contained herein constitutes the complete write-up of the experiments I carried out for my first Qualifying Paper towards the PhD in Linguistics at Stanford University. The goal is to make this document both a dumping ground for my ideas while it is in progress, as well as, eventually, a publicly-available version of my Qualifying Paper, in the spirit of Open Science.
For this write-up and analysis, I require the following packages, loaded in here:
library(ggplot2)
library(tidyverse)
Registered S3 methods overwritten by 'dbplyr':
method from
print.tbl_lazy
print.tbl_sql
── Attaching packages ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── tidyverse 1.3.1 ──
✓ tibble 3.1.2 ✓ dplyr 1.0.6
✓ tidyr 1.1.3 ✓ stringr 1.4.0
✓ readr 1.4.0 ✓ forcats 0.5.1
✓ purrr 0.3.4
── Conflicts ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── tidyverse_conflicts() ──
x tidyr::expand() masks Matrix::expand()
x dplyr::filter() masks stats::filter()
x dplyr::lag() masks stats::lag()
x tidyr::pack() masks Matrix::pack()
x tidyr::unpack() masks Matrix::unpack()
library(lme4)
library(stringr)
library(languageR)
library(lmerTest)
library(reshape2)
Attaching package: ‘reshape2’
The following object is masked from ‘package:tidyr’:
smiths
library(grid)
source("helpers.R")
I also use a custom color palette, so I include the code for that here as well1.
bran_palette = c("#7ae7e5", "#fe5f55", "#B2A6DE", "#14342b", "#69385c")
theme_set(theme_minimal())
We also need the frequency data!
frequency <- read.csv("freq_vals.csv")
lib_cols <- c('ABC','CNN','PBS','NBC','MSNBC','NPR','CBS')
frequency <- frequency %>%
mutate(total_left = rowSums(frequency[lib_cols])) %>%
mutate(total_right = FOX) %>%
mutate(all_wpm = ((total_left + total_right) / 121500000) * 1000000) %>%
mutate(left_wpm = (total_left/109300000) * 1000000) %>%
mutate(right_wpm = (total_right/12200000) * 1000000) %>%
mutate(neutral_binary = ifelse(gender=="neutral",1,0)) %>%
mutate(morph_type = ifelse(lexeme!= 'actor' & lexeme!= 'host' & lexeme !='hunter' & lexeme!= 'villain' & lexeme!= 'heir' & lexeme!= 'hero','compound','adoption'))
frequency <- frequency %>%
group_by(word) %>%
summarise(mean_freq_left = mean(left_wpm), mean_freq_right = mean(right_wpm), mean_freq_all = mean(all_wpm)) %>%
rename(form = word)
Re-write frequency to avoid zero numbers!
frequency[frequency == 0.00000000] <- 0.0001
Take log frequency of each media type.
frequency <- frequency %>%
mutate(log_right = log(mean_freq_right), log_left = log(mean_freq_left), log_all = log(mean_freq_all))
Create media difference
frequency <- frequency %>%
mutate(media_diff = log_left - log_right) %>%
mutate(nonexistent = ifelse(media_diff == 0 & log_left < -4,"true","false"))
And here is the norming data values:
norming_data <- read.csv("norming_data.csv") %>%
filter(id!="example1") %>% # Will filter out non-critical trials, i.e. the example trial from the beginning of the experiment
mutate(equalized_response = ifelse(scale=="FM",8-response,response)) %>% # This will render all data points on the same scale, as participants randomly received either "very likely a man" or "very likely a woman" as the left end of their response scale, with the other appearing at the right end
mutate(orthog = ifelse(orthog=="sroceress","sorceress",orthog)) %>% # Fixes a typo
mutate(id = ifelse(id=="Stunt_double","stunt double",id)) %>% # This, as well as all lines below it, convert compounds formed by spaces from their underscore forms to their spaced forms (e.g. police_officer -> Police officer)
mutate(id = ifelse(id=="Police_officer","police officer",id)) %>%
mutate(id = ifelse(id=="Flight_attendant","flight attendant",id)) %>%
mutate(id = ifelse(id=="Anchor","anchor",id)) %>%
mutate(id = ifelse(id=="Businessperson","businessperson",id)) %>%
mutate(id = ifelse(id=="Camera","camera operator",id)) %>%
mutate(id = ifelse(id=="Congressperson","congressperson",id)) %>%
mutate(id = ifelse(id=="Craftsperson","craftsperson",id)) %>%
mutate(id = ifelse(id=="Crewmember","crewmember",id)) %>%
mutate(id = ifelse(id=="Firefighter","firefighter",id)) %>%
mutate(id = ifelse(id=="Foreperson","foreperson",id)) %>%
mutate(id = ifelse(id=="Layperson","layperson",id)) %>%
mutate(id = ifelse(id=="Meteorologist","meteorologist",id)) %>%
mutate(id = ifelse(id=="Salesperson","salesperson",id)) %>%
mutate(id = ifelse(id=="Actor","actor",id)) %>%
mutate(id = ifelse(id=="Heir","heir",id)) %>%
mutate(id = ifelse(id=="Hero","hero",id)) %>%
mutate(id = ifelse(id=="Host","host",id)) %>%
mutate(id = ifelse(id=="Hunter","hunter",id)) %>%
mutate(id = ifelse(id=="Villain","villain",id)) %>%
mutate(orthog = ifelse(orthog=="airline steward","steward",orthog)) %>%
mutate(orthog = ifelse(orthog=="airline stewardess","stewardess",orthog))
norming_exclusion <- norming_data %>%
filter(gender=="female") %>%
group_by(workerid) %>%
summarize(female_mean = mean(equalized_response)) %>%
unique() %>%
mutate(exclusion = female_mean < mean(female_mean) - 2*sd(female_mean)) %>%
filter(exclusion==TRUE)
norming_data <- norming_data[!(norming_data$workerid %in% norming_exclusion$workerid),]
norming_means <- norming_data %>%
filter(neutral_morh !="male_adoption") %>%
group_by(orthog,id) %>%
summarise(indi_mean = mean(equalized_response), trial_count=n()) %>%
rename(form = orthog) %>%
rename(lexeme =id)
`summarise()` has grouped output by 'orthog'. You can override using the `.groups` argument.
norming_adoptions <- norming_data %>%
filter(neutral_morh == "male_adoption") %>%
group_by(orthog) %>%
summarise(indi_mean = mean(equalized_response), trial_count=n()) %>%
mutate(lexeme = ifelse(orthog=="actress","actor",ifelse(orthog=="heiress","heir",ifelse(orthog=="heroine","hero",ifelse(orthog=="hostess","host",ifelse(orthog=="huntress","hunter",ifelse(orthog=="villainess","villain",orthog))))))) %>%
rename(form = orthog)
norming_adoptions <- norming_adoptions[, c("lexeme", "form", "indi_mean", "trial_count")]
norming_means <- rbind(norming_means,norming_adoptions) %>%
rename(lexeme_norm = lexeme)
Neutrals Only
norming_means_neutral <- norming_data %>%
filter(gender=="neutral") %>%
filter(neutral_morh !="male_adoption") %>%
group_by(orthog,id) %>%
summarise(indi_mean = mean(equalized_response), trial_count=n()) %>%
rename(form = orthog) %>%
rename(lexeme =id)
`summarise()` has grouped output by 'orthog'. You can override using the `.groups` argument.
norming_adoptions_neutral <- norming_data %>%
filter(gender=="neutral") %>%
filter(neutral_morh == "male_adoption") %>%
group_by(orthog) %>%
summarise(indi_mean = mean(equalized_response), trial_count=n()) %>%
mutate(lexeme = ifelse(orthog=="actress","actor",ifelse(orthog=="heiress","heir",ifelse(orthog=="heroine","hero",ifelse(orthog=="hostess","host",ifelse(orthog=="huntress","hunter",ifelse(orthog=="villainess","villain",orthog))))))) %>%
rename(form = orthog)
norming_adoptions_neutral <- norming_adoptions_neutral[, c("lexeme", "form", "indi_mean", "trial_count")]
norming_means_neutral <- rbind(norming_means_neutral,norming_adoptions_neutral)
Participants
We originally ran the experiment on 200 participants, recruited through the online participant recruitment platform Prolific. The mean time of the experiment was 5.39 minutes, and participants were paid $1.75 for their participation2. The only restrictions placed on participants were that they:
These requirements were implemented in order to assure that speakers came from at least somewhat similar linguistic backgrounds, as certain lexical items in the study (such as congressperson) are quite localized to the United States.
After this initial run of the experiment, we found that there was a dearth of conservative or Republican-aligned participants. As a result, we ran the experiment again, this time on 98 self-identified Republicans. This was achieved by adding a filter on Prolific so that only Republican-identified individuals could see the task. The rest of the experiment, including payment, was exactly the same, except that an additional disclaimer that participants could not use the FireFox browser experiment, after the first run revealed an incompatibility between JavaScript and FireFox. The two runs of the experiment amounted in a total of 298 participants who completed the task.
Reading in the Data
sprt_data <- read.csv('sprt_data.csv') %>%
filter(trial_id!= 'example') %>%
filter(region=='critical')
Exclusions
Now, we want to exclude any participants who failed to answer at least 85% of the attention check questions correctly. We do this by creating a list of all participants who scored less than 85% on these checks, and then cross-referencing this list with all data points, removing any data points whose participants were in the exclusion list.
sprt_exclusion <- sprt_data %>% group_by(workerid) %>%
summarise(accuracy = mean(response_correct)) %>%
mutate(exclude = ifelse(accuracy < 0.85,'Yes','No')) %>%
filter(exclude == 'Yes')
sprt_data <- sprt_data[!(sprt_data$workerid %in% sprt_exclusion$workerid),]
We all want to filter out all trials in which the reading time for the critical item was more than 2.5 standard deviations from the mean reading time on that lexical item across all participants.
sprt_data <- sprt_data %>%
group_by(trial_id) %>%
mutate(id_mean = mean(log(rt))) %>%
mutate(exclusion = (log(rt) < mean(log(rt)) - 2*sd(log(rt))|(log(rt) > mean(log(rt)) + 2*sd(log(rt))))) %>%
ungroup() %>%
filter(exclusion==FALSE)
spr_data %>% spr_data %>%
filter(!is.na(subject_information.age)) %>%
filter(!is.na(subject_information.poli_party))
Error in spr_data(.) : could not find function "spr_data"
This results in 238 trials being removed from the 5580 we got after the by-participant exclusions. We now have 5342 trials we can use for analysis.
Additional Information Now that we have only the rows we want, let’s add some new columns, which will contain important information for each data point. Here, we will be adding:
Ideally, I would’ve added all of these but the first when I actually created the stimuli and logged responses, but I forgot to! Luckily, R allows us to do this post-hoc fairly straightforwardly… which is good, since these features will be critical in our data visualization and analysis.
The question under investigation here is whether or not individuals’ conceptions of gender affect how they process gendered and gender-neutral forms of English personal and professional titles.
In order to examine this, we need to quanify participants’ ideological views! Here we have adopted the 13-item Social Roles Questionnaire put forth in Baber & Tucker (2006). Questions 1-5 correlate to the ‘Gender Transcendent’ subscale, and questions 6-13 correspond to the ‘Gender Linked’ subscale. Each item is scored on a scale of 0-100. So, the first thing we want to do is make two lists of columns which correspond to these two subscales, since the questions are stored individually in the data:
gender_transcendence_cols <- c('subject_information.gender_q1','subject_information.gender_q2','subject_information.gender_q3','subject_information.gender_q4','subject_information.gender_q5')
gender_linked_cols <- c('subject_information.gender_q6','subject_information.gender_q7','subject_information.gender_q8','subject_information.gender_q9','subject_information.gender_q10','subject_information.gender_q11','subject_information.gender_q12','subject_information.gender_q13')
Now we can use the mutate() method on sprt_data to add two new columns, one for each subscale. We tell R to take the means of the specified columns in [column_names] of sprt_data for each individual row: rowMeans(sprt_data[column_names]). We also have to subtract this mean from 100 in the case of the ‘Gender Transcendent’ subscale, since it is inversely scored. Finally, we can create an average total score regardless of subscores, simply by meaning the two subscores we already have.
sprt_data <- sprt_data %>%
mutate(gender_trans = 100 - (rowMeans(sprt_data[gender_transcendence_cols]))) %>%
mutate(gender_link = rowMeans(sprt_data[gender_linked_cols]))
gender_all = c('gender_trans','gender_link')
sprt_data <- sprt_data %>%
mutate(gender_total = rowMeans(sprt_data[gender_all]))
We also want to add whether the trial included a female or male referent (but also, like, destroy the binary!). In order to do this, we’ll just add a trial_gender column that says ‘female’ if the condition was either ‘neutral_female’ or ‘congruent_female’. Otherwise, we want the trial_gender to say ‘male’.
sprt_data <- sprt_data %>%
mutate(trial_gender = ifelse(condition=='neutral_female' | condition == 'congruent_female','female','male'))
sprt_data %>%
select(workerid,rt,condition,trial_id,trial_gender)
Now we want to add whether or not the lexeme’s neutral form is developed by compounding (as in ‘congress-person’) or by the adoption of the male form (as in ‘actor’ being used more for both men and women). In this study, we only have six lexemes of the latter type, so we’ll just tell R to assign those a morph_type value of ‘adoption’ (for ‘male adoption’), and all else will be assigned a value of ‘compound’.
sprt_data <- sprt_data%>%
mutate(morph_type = ifelse(lexeme!= 'actor' & lexeme!= 'host' & lexeme !='hunter' & lexeme!= 'villain' & lexeme!= 'heir' & lexeme!= 'hero','compound','adoption'))
sprt_data %>%
select(rt,lexeme,morph_type)
Another important factor we want to explore is the length of the critical item! In order to add this, we simply create a new column form_length and tell R to input as that column’s value the length of the string that appears in that row’s form column, which corresponds to the orthograpic form of the critical item in that trial. Note that this will include spaces in the count!
sprt_data <- sprt_data %>%
mutate(form_length = str_length(form))
sprt_residual_model <- lm(log(rt)~form_length, data = sprt_data)
sprt_data <- sprt_data %>%
mutate(resid_rt = resid(sprt_residual_model))
Now that we have these, we can run a simple linear regression which will show us the effect of orthographic length on reading time. Then we add a new column in the data which is the residual reading time, or the reading time in log space AFTER we control for the effects of orthographic length.
We also want to make sure we have a column which records whether or not the trial was gender-congruent (as in ‘Shelby is a congresswoman’) or gender neutral (as in ‘Shelby is a congressperson’). We add a trial_congruency column, which is valued as ‘congruent’ if that row’s condition is one of the two congruent conditions. Otherwise, it gets valued as ‘neutral’.
sprt_data <- sprt_data %>%
mutate(trial_congruency = ifelse(condition=='congruent_male' | condition == 'congruent_female','congruent','neutral'))
Finally, we can classify participants by their particular political alignment; we can construe this broadly as “Republicans” vs. “Democrats”, with those who declined to state a preference, or placed themselves in the middle, as “Non-Partisan”.
sprt_data <- sprt_data %>%
mutate(poli_party = ifelse(subject_information.party_alignment == 1 | subject_information.party_alignment == 2,'Republican',ifelse(subject_information.party_alignment == 4 | subject_information.party_alignment == 5,'Democrat','Non-Partisan')))
Joining independent data Now that we have this information, we want to left join our frequency information so that we can use it in later analyses. We begin by adding the norming values’ means, of all forms.
final_spr <- left_join(sprt_data,norming_means,by="form")
Now we can add the frequency data as well, by form.
final_spr <- left_join(final_spr,frequency,by="form")
Now we can add additional lexeme-level norming information for the neutral forms, so that we can tackle the question of what role real-world expectations have on processing times.
final_spr <- left_join(final_spr,norming_means_neutral,by="lexeme")
final_spr <- subset(final_spr, select = -c(form.y,trial_count.y,trial_count.x,error,subject_information.comments,subject_information.asses,subject_information.enjoyment,subject_information.gender_q1,subject_information.gender_q2,subject_information.gender_q3,subject_information.gender_q4,subject_information.gender_q5,subject_information.gender_q6,subject_information.gender_q7,subject_information.gender_q8,subject_information.gender_q9,subject_information.gender_q10,subject_information.gender_q11,subject_information.gender_q12,subject_information.gender_q13,lexeme_norm)) %>%
rename(form_norm = indi_mean.x, lexeme_norm = indi_mean.y, form = form.x)
frequency %>%
ggplot(aes(x=mean_freq_left,y=mean_freq_right, label=form)) +
geom_point() +
geom_text() +
geom_abline(intercept=0,slope=1,color="gray60") +
coord_fixed(xlim=c(0,250))
frequency %>%
filter(mean_freq_right < 50) %>%
ggplot(aes(x=mean_freq_left,y=mean_freq_right, label=form)) +
geom_point() +
geom_text() +
geom_abline(intercept=0,slope=1,color="gray60")
frequency %>%
ggplot(aes(x=log_left,y=log_right, label=form)) +
geom_point() +
geom_text(size=4,nudge_y=.5) +
geom_abline(intercept=0,slope=1,color="gray60")
transfer_data <- final_spr %>%
select(form,trial_gender) %>%
unique()
temp <- left_join(frequency,transfer_data, by="form")
temp <- temp %>%
mutate(form = fct_reorder(as.factor(form),media_diff)) %>%
mutate(morph_type = ifelse(form!= 'actor' & form!= 'host' & form !='hunter' & form!= 'villain' & form!= 'heir' & form!= 'hero' & form!= "actress" & form!= "hostess" & form!= "huntress" & form!= "villainess" & form!= "heiress" & form!= "heroine",'compound','adoption')) %>%
mutate(gender = ifelse(form== 'anchor' | form== 'businessperson'| form== 'camera operator' | form== 'congressperson'| form== 'craftsperson'| form== 'crewmember'| form== 'firefighter'| form== 'flight attendant'| form== 'foreperson'| form== 'layperson'| form== 'meteorologist'| form== 'police officer'| form== 'salesperson'| form== 'stunt double','neutral','gendered')) %>%
mutate(gender = ifelse(gender == "gendered",as.character(trial_gender),gender)) %>%
filter(!(trial_gender == "female" & gender=="neutral")) %>%
filter(!(form=="actor" & gender=="female" | (form=="heir" & gender=="female")| (form=="hero" & gender=="female")| (form=="hunter" & gender=="female")| (form=="heir" & gender=="female")| (form=="host" & gender=="female")| (form=="villain" & gender=="female")))
temp %>%
ggplot(aes(x=form, y=media_diff, fill=gender,alpha=morph_type)) +
geom_bar(stat="identity") +
theme(axis.text.x = element_text(angle=45, hjust = 1, vjust = 1)) +
scale_alpha_discrete(range = c(0.5,1))
Warning: Using alpha for a discrete variable is not advised.
final_spr %>%
ggplot(aes(x=log_all, y=resid_rt, color=trial_gender, linetype=trial_congruency)) +
geom_point() +
geom_smooth()
`geom_smooth()` using method = 'gam' and formula 'y ~ s(x, bs = "cs")'
final_spr %>%
group_by(form,trial_congruency,trial_gender) %>%
mutate(resid_rt_mean = mean(resid_rt)) %>%
ggplot(aes(x=log_all,y=resid_rt_mean,color=trial_gender,linetype=trial_congruency)) +
geom_point() +
geom_smooth(method="lm")
`geom_smooth()` using formula 'y ~ x'
final_spr %>%
group_by(form,trial_congruency,trial_gender,morph_type) %>%
mutate(resid_rt_mean = mean(resid_rt)) %>%
filter(log_all > -5) %>%
ggplot(aes(x=log_all,y=resid_rt_mean,color=trial_gender,linetype=trial_congruency,label=form,shape=trial_congruency)) +
geom_point() +
geom_smooth(method="lm") +
geom_text(size=4,nudge_y =.03)
`geom_smooth()` using formula 'y ~ x'
final_spr %>%
filter(!is.na(poli_party)) %>%
group_by(form,trial_congruency,trial_gender,morph_type,poli_party) %>%
mutate(resid_rt_mean = mean(resid_rt)) %>%
filter(log_all > -5) %>%
ggplot(aes(x=log_all,y=resid_rt_mean,color=trial_gender,linetype=trial_congruency,label=form,shape=trial_congruency)) +
geom_point() +
geom_smooth(method="lm") +
geom_text(size=2,nudge_y =.03) +
facet_wrap(~poli_party)
`geom_smooth()` using formula 'y ~ x'
log_left, democrats
final_spr %>%
filter(poli_party == "Democrat") %>%
group_by(form,trial_congruency,trial_gender,morph_type) %>%
mutate(resid_rt_mean = mean(resid_rt)) %>%
filter(log_left > -5) %>%
ggplot(aes(x=log_left,y=resid_rt_mean,label=form)) +
geom_point() +
geom_smooth(method="lm") +
geom_text(size=4,nudge_y =.03)
`geom_smooth()` using formula 'y ~ x'
final_spr %>%
filter(poli_party == "Democrat") %>%
group_by(form,trial_congruency,trial_gender,morph_type) %>%
mutate(resid_rt_mean = mean(resid_rt)) %>%
filter(log_left > -5) %>%
ggplot(aes(x=log_left,y=resid_rt_mean,color=trial_gender,linetype=trial_congruency,label=form,shape=trial_congruency)) +
geom_point() +
geom_smooth(method="lm") +
geom_text(size=4,nudge_y =.03)
`geom_smooth()` using formula 'y ~ x'
log_all, democrats
final_spr %>%
filter(poli_party == "Democrat") %>%
group_by(form,trial_congruency,trial_gender,morph_type) %>%
mutate(resid_rt_mean = mean(resid_rt)) %>%
filter(log_left > -5) %>%
ggplot(aes(x=log_all,y=resid_rt_mean,color=trial_gender,linetype=trial_congruency,label=form,shape=trial_congruency)) +
geom_point() +
geom_smooth(method="lm") +
geom_text(size=4,nudge_y =.03)
`geom_smooth()` using formula 'y ~ x'
log_right, republicans
final_spr %>%
filter(poli_party == "Republican") %>%
group_by(form,trial_congruency,trial_gender,morph_type) %>%
mutate(resid_rt_mean = mean(resid_rt)) %>%
filter(log_right > -5) %>%
ggplot(aes(x=log_right,y=resid_rt_mean,label=form)) +
geom_point() +
geom_smooth(method="lm") +
geom_text(size=4,nudge_y =.03)
`geom_smooth()` using formula 'y ~ x'
final_spr %>%
filter(poli_party == "Republican") %>%
group_by(form,trial_congruency,trial_gender,morph_type) %>%
mutate(resid_rt_mean = mean(resid_rt)) %>%
filter(log_right > -5) %>%
ggplot(aes(x=log_right,y=resid_rt_mean,color=trial_gender,linetype=trial_congruency,label=form,shape=trial_congruency)) +
geom_point() +
geom_smooth(method="lm") +
geom_text(size=4,nudge_y =.03)
`geom_smooth()` using formula 'y ~ x'
log_all, republicans
final_spr %>%
filter(poli_party == "Republican") %>%
group_by(form,trial_congruency,trial_gender,morph_type) %>%
mutate(resid_rt_mean = mean(resid_rt)) %>%
filter(log_right > -5) %>%
ggplot(aes(x=log_all,y=resid_rt_mean,color=trial_gender,linetype=trial_congruency,label=form,shape=trial_congruency)) +
geom_point() +
geom_smooth(method="lm") +
geom_text(size=4,nudge_y =.03)
`geom_smooth()` using formula 'y ~ x'
log_left, republicans
final_spr %>%
filter(poli_party == "Republican") %>%
group_by(form,trial_congruency,trial_gender,morph_type) %>%
mutate(resid_rt_mean = mean(resid_rt)) %>%
filter(log_right > -5) %>%
ggplot(aes(x=log_left,y=resid_rt_mean,color=trial_gender,linetype=trial_congruency,label=form,shape=trial_congruency)) +
geom_point() +
geom_smooth(method="lm") +
geom_text(size=4,nudge_y =.03)
`geom_smooth()` using formula 'y ~ x'
cor(final_spr$log_all,final_spr$log_left)
[1] 0.9998266
cor(final_spr$log_all,final_spr$log_right)
[1] 0.8559998
cor(final_spr$log_left,final_spr$log_right)
[1] 0.8495668
These plots explore single facets along which individual predictions might be made about reading times.
final_spr %>%
ggplot(aes(x=form_norm,y=resid_rt)) +
geom_point() +
geom_smooth(method='lm')
`geom_smooth()` using formula 'y ~ x'
`
final_spr %>%
group_by(form,trial_gender,trial_congruency) %>%
mutate(mean_resid_rt = mean(resid_rt)) %>%
ggplot(aes(x=form_norm,y=mean_resid_rt,color=trial_gender,linetype=trial_congruency,shape=trial_congruency)) +
geom_point() +
geom_smooth(method='lm')
`geom_smooth()` using formula 'y ~ x'
final_spr %>%
group_by(form,trial_gender,trial_congruency) %>%
mutate(mean_resid_rt = mean(resid_rt)) %>%
ggplot(aes(x=lexeme_norm,y=mean_resid_rt,color=trial_gender,linetype=trial_congruency,shape=trial_congruency)) +
geom_point() +
geom_smooth(method='lm')
`geom_smooth()` using formula 'y ~ x'
final_spr %>%
filter(lexeme != "flight attendant") %>%
group_by(form,trial_gender,trial_congruency) %>%
mutate(mean_resid_rt = mean(resid_rt)) %>%
ggplot(aes(x=lexeme_norm,y=mean_resid_rt,color=trial_gender,linetype=trial_congruency,shape=trial_congruency)) +
geom_point() +
geom_smooth(method='lm')
`geom_smooth()` using formula 'y ~ x'
Left Wing, All Items
final_spr %>%
ggplot(aes(x=mean_freq_left,y=resid_rt)) +
geom_point() +
geom_smooth(method='lm')
`geom_smooth()` using formula 'y ~ x'
Left Wing, Neutral Items
sanity = final_spr %>%
filter(trial_congruency=="neutral")
final_spr %>%
filter(trial_congruency=="neutral") %>%
ggplot(aes(x=mean_freq_left,y=resid_rt)) +
geom_point() +
geom_smooth(method='lm')
`geom_smooth()` using formula 'y ~ x'
Right Wing
final_spr %>%
ggplot(aes(x=mean_freq_right,y=resid_rt)) +
geom_point() +
geom_smooth(method='lm')
`geom_smooth()` using formula 'y ~ x'
final_spr %>%
filter(trial_congruency=="neutral") %>%
ggplot(aes(x=mean_freq_right,y=resid_rt)) +
geom_point() +
geom_smooth(method='lm')
`geom_smooth()` using formula 'y ~ x'
Gender Total
final_spr %>%
filter(gender_total < 51) %>%
ggplot(aes(x=gender_total,y=resid_rt,color=trial_gender,linetype=trial_congruency)) +
geom_point() +
geom_smooth(method='lm') # +
`geom_smooth()` using formula 'y ~ x'
# facet_grid(trial_gender~trial_congruency)
Gender Link
final_spr %>%
filter(trial_congruency == "neutral") %>%
ggplot(aes(x=gender_link,y=resid_rt)) +
geom_point() +
geom_smooth(method='lm')
`geom_smooth()` using formula 'y ~ x'
Gender Transendence
final_spr %>%
filter(trial_congruency == "neutral") %>%
ggplot(aes(x=gender_trans,y=resid_rt)) +
geom_point() +
geom_smooth(method='lm')
`geom_smooth()` using formula 'y ~ x'
final_spr <- final_spr %>%
mutate(trial_congruency = as.factor(trial_congruency)) %>%
mutate(trial_congruency = fct_relevel(trial_congruency,"neutral")) %>%
mutate(trial_gender = as.factor(trial_gender)) %>%
mutate(c_gender_total = scale(gender_total,scale=FALSE)) %>%
mutate(c_gender_trans = scale(gender_trans,scale=FALSE)) %>%
mutate(c_gender_link = scale(gender_link,scale=FALSE)) %>%
mutate(c_trial_gender = scale(as.numeric(trial_gender),scale=FALSE)) %>%
mutate(c_trial_congruency = scale(as.numeric(trial_congruency),scale=FALSE))
subject_means <- final_spr %>%
select(workerid,subject_information.party_alignment,gender_link,gender_total,gender_trans) %>%
unique()
subject_means_w_party <- final_spr %>%
select(workerid,subject_information.party_alignment,gender_link,gender_total,gender_trans) %>%
filter(!is.na(subject_information.party_alignment)) %>%
unique()
model_one <- lmer(resid_rt~gender_total*trial_congruency*trial_gender + (1 |name) + (1|workerid) + (1|lexeme), data=final_spr)
summary(model_one)
Linear mixed model fit by REML. t-tests use Satterthwaite's method ['lmerModLmerTest']
Formula: resid_rt ~ gender_total * trial_congruency * trial_gender + (1 | name) + (1 | workerid) + (1 | lexeme)
Data: final_spr
REML criterion at convergence: 3841
Scaled residuals:
Min 1Q Median 3Q Max
-3.9485 -0.6000 -0.0504 0.5241 4.9619
Random effects:
Groups Name Variance Std.Dev.
workerid (Intercept) 0.1484466 0.38529
name (Intercept) 0.0002364 0.01538
lexeme (Intercept) 0.0014200 0.03768
Residual 0.0987091 0.31418
Number of obs: 5342, groups: workerid, 278; name, 24; lexeme, 20
Fixed effects:
Estimate Std. Error df t value Pr(>|t|)
(Intercept) 1.049e-01 4.651e-02 3.475e+02 2.256 0.0247 *
gender_total -3.986e-03 1.545e-03 3.332e+02 -2.581 0.0103 *
trial_congruencycongruent 8.512e-03 2.256e-02 5.045e+03 0.377 0.7060
trial_gendermale -1.356e-02 2.329e-02 4.649e+02 -0.582 0.5607
gender_total:trial_congruencycongruent 7.228e-04 7.672e-04 5.044e+03 0.942 0.3462
gender_total:trial_gendermale 1.052e-04 7.631e-04 5.040e+03 0.138 0.8904
trial_congruencycongruent:trial_gendermale -3.129e-02 3.182e-02 5.045e+03 -0.983 0.3254
gender_total:trial_congruencycongruent:trial_gendermale -6.370e-04 1.079e-03 5.044e+03 -0.590 0.5550
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Correlation of Fixed Effects:
(Intr) gndr_t trl_cn trl_gn gndr_ttl:trl_c gndr_ttl:trl_g trl_:_
gender_totl -0.822
trl_cngrncy -0.243 0.209
tril_gndrml -0.253 0.202 0.484
gndr_ttl:trl_c 0.204 -0.249 -0.840 -0.407
gndr_ttl:trl_g 0.205 -0.250 -0.422 -0.809 0.503
trl_cngrn:_ 0.172 -0.148 -0.709 -0.680 0.595 0.593
gndr_tt:_:_ -0.145 0.177 0.597 0.572 -0.710 -0.707 -0.840
model_two <- lmer(resid_rt~c_gender_total*c_trial_congruency*c_trial_gender + (1 |name) + (1|workerid) + (1|lexeme), data=final_spr)
summary(model_two)
Linear mixed model fit by REML. t-tests use Satterthwaite's method ['lmerModLmerTest']
Formula: resid_rt ~ c_gender_total * c_trial_congruency * c_trial_gender + (1 | name) + (1 | workerid) + (1 | lexeme)
Data: final_spr
REML criterion at convergence: 3841
Scaled residuals:
Min 1Q Median 3Q Max
-3.9485 -0.6000 -0.0504 0.5241 4.9619
Random effects:
Groups Name Variance Std.Dev.
workerid (Intercept) 0.1484466 0.38529
name (Intercept) 0.0002364 0.01538
lexeme (Intercept) 0.0014200 0.03768
Residual 0.0987091 0.31418
Number of obs: 5342, groups: workerid, 278; name, 24; lexeme, 20
Fixed effects:
Estimate Std. Error df t value Pr(>|t|)
(Intercept) 2.053e-03 2.517e-02 2.554e+02 0.082 0.93508
c_gender_total -3.732e-03 1.471e-03 2.742e+02 -2.538 0.01172 *
c_trial_congruency 2.719e-03 8.621e-03 5.041e+03 0.315 0.75245
c_trial_gender -3.444e-02 1.067e-02 2.215e+01 -3.228 0.00385 **
c_gender_total:c_trial_congruency 4.021e-04 5.401e-04 5.047e+03 0.745 0.45654
c_gender_total:c_trial_gender -2.127e-04 5.397e-04 5.033e+03 -0.394 0.69357
c_trial_congruency:c_trial_gender -4.707e-02 1.724e-02 5.040e+03 -2.730 0.00635 **
c_gender_total:c_trial_congruency:c_trial_gender -6.370e-04 1.079e-03 5.044e+03 -0.590 0.55502
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Correlation of Fixed Effects:
(Intr) c_gnd_ c_trl_c c_trl_g c_gndr_ttl:c_trl_c c_gndr_ttl:c_trl_g c_t_:__
c_gendr_ttl -0.001
c_trl_cngrn 0.000 -0.001
c_tril_gndr 0.000 0.000 0.002
c_gndr_ttl:c_trl_c -0.001 0.000 -0.001 -0.004
c_gndr_ttl:c_trl_g -0.001 -0.001 -0.004 0.001 0.001
c_trl_cn:__ 0.000 -0.001 0.000 0.000 -0.005 -0.005
c_gn_:__:__ -0.001 0.000 -0.004 -0.004 -0.003 -0.002 -0.001
model_three <- lmer(resid_rt~c_gender_total*c_trial_congruency*c_trial_gender + (1 + c_gender_total + c_trial_congruency|name) + (1 + c_trial_congruency + c_trial_gender|workerid) + (1 + c_trial_congruency + c_trial_gender|lexeme), data=final_spr)
boundary (singular) fit: see ?isSingular
summary(model_three)
Linear mixed model fit by REML. t-tests use Satterthwaite's method ['lmerModLmerTest']
Formula: resid_rt ~ c_gender_total * c_trial_congruency * c_trial_gender + (1 + c_gender_total + c_trial_congruency | name) + (1 + c_trial_congruency +
c_trial_gender | workerid) + (1 + c_trial_congruency + c_trial_gender | lexeme)
Data: final_spr
REML criterion at convergence: 3795.7
Scaled residuals:
Min 1Q Median 3Q Max
-4.0653 -0.5928 -0.0411 0.5204 4.7128
Random effects:
Groups Name Variance Std.Dev. Corr
workerid (Intercept) 1.486e-01 3.854e-01
c_trial_congruency 1.640e-03 4.050e-02 0.04
c_trial_gender 2.218e-03 4.710e-02 -0.23 0.89
name (Intercept) 2.663e-04 1.632e-02
c_gender_total 2.597e-09 5.096e-05 1.00
c_trial_congruency 1.827e-04 1.352e-02 1.00 1.00
lexeme (Intercept) 1.471e-03 3.835e-02
c_trial_congruency 4.867e-03 6.977e-02 -0.03
c_trial_gender 1.374e-03 3.707e-02 -0.14 -0.62
Residual 9.617e-02 3.101e-01
Number of obs: 5342, groups: workerid, 278; name, 24; lexeme, 20
Fixed effects:
Estimate Std. Error df t value Pr(>|t|)
(Intercept) 2.545e-03 2.525e-02 2.538e+02 0.101 0.9198
c_gender_total -3.710e-03 1.471e-03 2.728e+02 -2.522 0.0122 *
c_trial_congruency 3.237e-03 1.815e-02 1.939e+01 0.178 0.8603
c_trial_gender -3.534e-02 1.392e-02 2.086e+01 -2.538 0.0192 *
c_gender_total:c_trial_congruency 3.884e-04 5.549e-04 2.774e+02 0.700 0.4846
c_gender_total:c_trial_gender -2.474e-04 5.627e-04 2.658e+02 -0.440 0.6605
c_trial_congruency:c_trial_gender -4.723e-02 1.793e-02 5.853e+01 -2.634 0.0108 *
c_gender_total:c_trial_congruency:c_trial_gender -6.720e-04 1.068e-03 4.562e+03 -0.629 0.5294
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Correlation of Fixed Effects:
(Intr) c_gnd_ c_trl_c c_trl_g c_gndr_ttl:c_trl_c c_gndr_ttl:c_trl_g c_t_:__
c_gendr_ttl 0.000
c_trl_cngrn 0.016 0.001
c_tril_gndr -0.070 0.000 -0.293
c_gndr_ttl:c_trl_c -0.001 0.011 -0.001 -0.003
c_gndr_ttl:c_trl_g 0.000 -0.072 -0.002 0.018 0.078
c_trl_cn:__ 0.000 -0.001 0.000 0.148 -0.004 0.006
c_gn_:__:__ -0.001 0.000 -0.002 -0.003 -0.004 -0.001 0.000
optimizer (nloptwrap) convergence code: 0 (OK)
boundary (singular) fit: see ?isSingular
Same as Model 3, but with political orientation (5-point scale) added in without interactions
model_four <- lmer(resid_rt~c_gender_total*c_trial_congruency*c_trial_gender + subject_information.party_alignment + (1 + c_gender_total + c_trial_congruency|name) + (1 + c_trial_congruency + c_trial_gender|workerid) + (1 + c_trial_congruency + c_trial_gender|lexeme), data=final_spr)
boundary (singular) fit: see ?isSingular
summary(model_four)
Linear mixed model fit by REML. t-tests use Satterthwaite's method ['lmerModLmerTest']
Formula: resid_rt ~ c_gender_total * c_trial_congruency * c_trial_gender + subject_information.party_alignment + (1 + c_gender_total +
c_trial_congruency | name) + (1 + c_trial_congruency + c_trial_gender | workerid) + (1 + c_trial_congruency + c_trial_gender | lexeme)
Data: final_spr
REML criterion at convergence: 3745.7
Scaled residuals:
Min 1Q Median 3Q Max
-4.0945 -0.5919 -0.0405 0.5237 4.7156
Random effects:
Groups Name Variance Std.Dev. Corr
workerid (Intercept) 1.460e-01 3.821e-01
c_trial_congruency 2.055e-03 4.534e-02 0.07
c_trial_gender 2.640e-03 5.138e-02 -0.25 0.78
name (Intercept) 2.955e-04 1.719e-02
c_gender_total 3.491e-09 5.908e-05 1.00
c_trial_congruency 2.538e-04 1.593e-02 0.99 0.99
lexeme (Intercept) 1.485e-03 3.853e-02
c_trial_congruency 4.557e-03 6.751e-02 -0.07
c_trial_gender 1.441e-03 3.796e-02 -0.14 -0.59
Residual 9.551e-02 3.090e-01
Number of obs: 5303, groups: workerid, 276; name, 24; lexeme, 20
Fixed effects:
Estimate Std. Error df t value Pr(>|t|)
(Intercept) 1.873e-01 7.160e-02 2.786e+02 2.615 0.009396 **
c_gender_total -6.080e-03 1.713e-03 2.710e+02 -3.549 0.000456 ***
c_trial_congruency 3.445e-03 1.785e-02 2.016e+01 0.193 0.848872
c_trial_gender -3.509e-02 1.427e-02 2.193e+01 -2.458 0.022320 *
subject_information.party_alignment -5.939e-02 2.137e-02 2.700e+02 -2.778 0.005846 **
c_gender_total:c_trial_congruency 3.847e-04 5.600e-04 2.645e+02 0.687 0.492698
c_gender_total:c_trial_gender -2.449e-04 5.679e-04 2.592e+02 -0.431 0.666590
c_trial_congruency:c_trial_gender -5.212e-02 1.826e-02 4.877e+01 -2.854 0.006326 **
c_gender_total:c_trial_congruency:c_trial_gender -3.723e-04 1.068e-03 4.512e+03 -0.349 0.727350
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Correlation of Fixed Effects:
(Intr) c_gnd_ c_trl_c c_trl_g sbj_._ c_gndr_ttl:c_trl_c c_gndr_ttl:c_trl_g c_t_:__
c_gendr_ttl -0.489
c_trl_cngrn 0.004 0.001
c_tril_gndr -0.028 0.000 -0.269
sbjct_nfr._ -0.936 0.521 0.000 0.000
c_gndr_ttl:c_trl_c 0.000 0.017 -0.004 -0.003 0.000
c_gndr_ttl:c_trl_g 0.000 -0.073 -0.002 0.018 0.000 0.082
c_trl_cn:__ 0.000 0.000 0.000 0.175 0.000 -0.004 0.010
c_gn_:__:__ 0.000 0.000 -0.002 -0.003 0.000 -0.003 -0.001 -0.005
optimizer (nloptwrap) convergence code: 0 (OK)
boundary (singular) fit: see ?isSingular
model_five <- lm(gender_total~subject_information.party_alignment, data=subject_means)
summary(model_five)
Call:
lm(formula = gender_total ~ subject_information.party_alignment,
data = subject_means)
Residuals:
Min 1Q Median 3Q Max
-30.907 -10.293 -1.341 9.145 56.157
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 45.2966 2.1809 20.77 <2e-16 ***
subject_information.party_alignment -6.5261 0.6449 -10.12 <2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 13.7 on 274 degrees of freedom
(2 observations deleted due to missingness)
Multiple R-squared: 0.272, Adjusted R-squared: 0.2694
F-statistic: 102.4 on 1 and 274 DF, p-value: < 2.2e-16
ideo_residuals <- data.frame(
subject_means_w_party["workerid"],
ResidIdeo = lm(gender_total~subject_information.party_alignment, data=subject_means_w_party)$resid
)
final_spr <- left_join(final_spr,ideo_residuals,by="workerid")
Same as Model Four but with ResidualIdeologies instead of raw ideology scores
model_six <- lmer(resid_rt~ResidIdeo*c_trial_congruency*c_trial_gender + subject_information.party_alignment + (1 + ResidIdeo + c_trial_congruency|name) + (1 + c_trial_congruency + c_trial_gender|workerid) + (1 + c_trial_congruency + c_trial_gender|lexeme), data=final_spr)
Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
unable to evaluate scaled gradient
Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
Model failed to converge: degenerate Hessian with 1 negative eigenvalues
Warning: Model failed to converge with 1 negative eigenvalue: -8.9e+00
summary(model_six)
Linear mixed model fit by REML. t-tests use Satterthwaite's method ['lmerModLmerTest']
Formula: resid_rt ~ ResidIdeo * c_trial_congruency * c_trial_gender + subject_information.party_alignment + (1 + ResidIdeo + c_trial_congruency |
name) + (1 + c_trial_congruency + c_trial_gender | workerid) + (1 + c_trial_congruency + c_trial_gender | lexeme)
Data: final_spr
REML criterion at convergence: 3743.2
Scaled residuals:
Min 1Q Median 3Q Max
-4.1314 -0.5920 -0.0412 0.5211 4.7148
Random effects:
Groups Name Variance Std.Dev. Corr
workerid (Intercept) 1.451e-01 0.3808879
c_trial_congruency 1.701e-03 0.0412388 0.07
c_trial_gender 2.363e-03 0.0486093 -0.26 0.95
name (Intercept) 2.967e-04 0.0172239
ResidIdeo 9.888e-08 0.0003144 0.08
c_trial_congruency 2.763e-04 0.0166231 0.89 -0.38
lexeme (Intercept) 1.483e-03 0.0385117
c_trial_congruency 4.668e-03 0.0683233 -0.05
c_trial_gender 1.429e-03 0.0377993 -0.14 -0.60
Residual 9.564e-02 0.3092520
Number of obs: 5303, groups: workerid, 276; name, 24; lexeme, 20
Fixed effects:
Estimate Std. Error df t value Pr(>|t|)
(Intercept) 6.060e-02 6.219e-02 2.824e+02 0.974 0.330693
ResidIdeo -5.972e-03 1.711e-03 2.713e+02 -3.490 0.000564 ***
c_trial_congruency 3.399e-03 1.799e-02 1.962e+01 0.189 0.852128
c_trial_gender -3.509e-02 1.423e-02 2.169e+01 -2.466 0.022046 *
subject_information.party_alignment -1.914e-02 1.817e-02 2.717e+02 -1.053 0.293185
ResidIdeo:c_trial_congruency 7.228e-04 6.558e-04 3.393e+02 1.102 0.271126
ResidIdeo:c_trial_gender -6.283e-04 6.776e-04 4.683e+01 -0.927 0.358584
c_trial_congruency:c_trial_gender -5.206e-02 1.838e-02 3.887e+01 -2.833 0.007276 **
ResidIdeo:c_trial_congruency:c_trial_gender 1.151e-04 1.260e-03 4.676e+03 0.091 0.927224
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Correlation of Fixed Effects:
(Intr) ResdId c_trl_c c_trl_g sbj_._ RsdId:c_trl_c RsdId:c_trl_g c__:__
ResidIdeo -0.001
c_trl_cngrn 0.007 -0.003
c_tril_gndr -0.031 0.000 -0.276
sbjct_nfr._ -0.915 0.001 0.001 0.001
RsdId:c_trl_c 0.000 0.018 -0.003 -0.002 0.000
RsdId:c_trl_g 0.000 -0.082 -0.001 0.004 0.000 0.087
c_trl_cn:__ -0.001 0.000 0.000 0.164 0.001 -0.001 -0.031
RsdId:__:__ 0.000 0.000 -0.001 -0.003 0.000 -0.004 -0.001 -0.005
optimizer (nloptwrap) convergence code: 0 (OK)
unable to evaluate scaled gradient
Model failed to converge: degenerate Hessian with 1 negative eigenvalues
final_spr %>%
ggplot(aes(x=ResidIdeo,y=resid_rt)) +
geom_point() +
geom_smooth()
`geom_smooth()` using method = 'gam' and formula 'y ~ s(x, bs = "cs")'
Warning: Removed 39 rows containing non-finite values (stat_smooth).
Warning: Removed 39 rows containing missing values (geom_point).
Same as model six, but with added log_all frequency
model_seven <- lmer(resid_rt~ResidIdeo*c_trial_congruency*c_trial_gender + subject_information.party_alignment + log_all + (1 + ResidIdeo + c_trial_congruency|name) + (1 + c_trial_congruency + c_trial_gender|workerid) + (1 + c_trial_congruency + c_trial_gender|lexeme), data=final_spr)
Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
Model failed to converge with max|grad| = 0.107412 (tol = 0.002, component 1)
summary(model_seven)
Linear mixed model fit by REML. t-tests use Satterthwaite's method ['lmerModLmerTest']
Formula: resid_rt ~ ResidIdeo * c_trial_congruency * c_trial_gender + subject_information.party_alignment + log_all + (1 + ResidIdeo +
c_trial_congruency | name) + (1 + c_trial_congruency + c_trial_gender | workerid) + (1 + c_trial_congruency + c_trial_gender | lexeme)
Data: final_spr
REML criterion at convergence: 3748.6
Scaled residuals:
Min 1Q Median 3Q Max
-4.1256 -0.5940 -0.0432 0.5240 4.7045
Random effects:
Groups Name Variance Std.Dev. Corr
workerid (Intercept) 1.448e-01 0.3804817
c_trial_congruency 1.992e-03 0.0446374 0.06
c_trial_gender 2.517e-03 0.0501727 -0.25 0.77
name (Intercept) 2.932e-04 0.0171229
ResidIdeo 1.061e-07 0.0003258 0.05
c_trial_congruency 2.643e-04 0.0162583 0.89 -0.40
lexeme (Intercept) 1.477e-03 0.0384289
c_trial_congruency 4.233e-03 0.0650629 -0.05
c_trial_gender 1.367e-03 0.0369790 -0.18 -0.63
Residual 9.551e-02 0.3090526
Number of obs: 5303, groups: workerid, 276; name, 24; lexeme, 20
Fixed effects:
Estimate Std. Error df t value Pr(>|t|)
(Intercept) 6.079e-02 6.213e-02 2.832e+02 0.978 0.328686
ResidIdeo -5.968e-03 1.709e-03 2.720e+02 -3.491 0.000561 ***
c_trial_congruency -4.585e-03 1.780e-02 2.094e+01 -0.258 0.799299
c_trial_gender -2.175e-02 1.548e-02 2.944e+01 -1.405 0.170524
subject_information.party_alignment -1.906e-02 1.815e-02 2.725e+02 -1.050 0.294508
log_all -6.475e-03 3.090e-03 5.965e+01 -2.096 0.040371 *
ResidIdeo:c_trial_congruency 7.225e-04 6.597e-04 2.811e+02 1.095 0.274368
ResidIdeo:c_trial_gender -6.172e-04 6.804e-04 4.416e+01 -0.907 0.369266
c_trial_congruency:c_trial_gender -2.576e-02 2.222e-02 7.496e+01 -1.159 0.250120
ResidIdeo:c_trial_congruency:c_trial_gender 1.322e-04 1.259e-03 4.465e+03 0.105 0.916372
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Correlation of Fixed Effects:
(Intr) ResdId c_trl_c c_trl_g sbj_._ log_ll RsdId:c_trl_c RsdId:c_trl_g c__:__
ResidIdeo -0.001
c_trl_cngrn 0.006 -0.003
c_tril_gndr -0.031 0.001 -0.341
sbjct_nfr._ -0.915 0.001 0.000 0.001
log_all -0.003 -0.001 0.214 -0.411 -0.001
RsdId:c_trl_c 0.000 0.018 -0.002 -0.004 0.000 0.004
RsdId:c_trl_g 0.000 -0.083 -0.002 0.004 0.000 -0.005 0.079
c_trl_cn:__ 0.001 0.000 -0.121 0.354 0.001 -0.567 -0.003 -0.024
RsdId:__:__ 0.000 0.000 -0.002 0.000 0.000 -0.007 -0.004 -0.001 0.000
optimizer (nloptwrap) convergence code: 0 (OK)
Model failed to converge with max|grad| = 0.107412 (tol = 0.002, component 1)
Same as model seven, but with added neutral lexeme-level norms
model_eight <- lmer(resid_rt~ResidIdeo*c_trial_congruency*c_trial_gender + subject_information.party_alignment + log_all + lexeme_norm + (1 + ResidIdeo + c_trial_congruency|name) + (1 + c_trial_congruency + c_trial_gender|workerid) + (1 + c_trial_congruency + c_trial_gender|lexeme), data=final_spr)
Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
Model failed to converge with max|grad| = 0.0921702 (tol = 0.002, component 1)
summary(model_eight)
Linear mixed model fit by REML. t-tests use Satterthwaite's method ['lmerModLmerTest']
Formula: resid_rt ~ ResidIdeo * c_trial_congruency * c_trial_gender + subject_information.party_alignment + log_all + lexeme_norm +
(1 + ResidIdeo + c_trial_congruency | name) + (1 + c_trial_congruency + c_trial_gender | workerid) + (1 + c_trial_congruency + c_trial_gender | lexeme)
Data: final_spr
REML criterion at convergence: 3754.7
Scaled residuals:
Min 1Q Median 3Q Max
-4.1263 -0.5936 -0.0439 0.5236 4.7009
Random effects:
Groups Name Variance Std.Dev. Corr
workerid (Intercept) 1.454e-01 0.3812801
c_trial_congruency 1.967e-03 0.0443470 0.06
c_trial_gender 2.511e-03 0.0501097 -0.25 0.79
name (Intercept) 2.954e-04 0.0171861
ResidIdeo 1.061e-07 0.0003258 0.06
c_trial_congruency 2.683e-04 0.0163788 0.89 -0.41
lexeme (Intercept) 1.582e-03 0.0397699
c_trial_congruency 4.207e-03 0.0648591 -0.05
c_trial_gender 1.348e-03 0.0367197 -0.18 -0.64
Residual 9.550e-02 0.3090332
Number of obs: 5303, groups: workerid, 276; name, 24; lexeme, 20
Fixed effects:
Estimate Std. Error df t value Pr(>|t|)
(Intercept) 6.206e-02 9.187e-02 5.820e+01 0.676 0.502014
ResidIdeo -5.968e-03 1.713e-03 2.705e+02 -3.484 0.000576 ***
c_trial_congruency -4.675e-03 1.780e-02 2.113e+01 -0.263 0.795367
c_trial_gender -2.158e-02 1.555e-02 2.994e+01 -1.388 0.175311
subject_information.party_alignment -1.905e-02 1.819e-02 2.708e+02 -1.047 0.296020
log_all -6.554e-03 3.195e-03 6.083e+01 -2.051 0.044555 *
lexeme_norm -3.733e-04 1.894e-02 1.852e+01 -0.020 0.984489
ResidIdeo:c_trial_congruency 7.226e-04 6.593e-04 2.787e+02 1.096 0.274028
ResidIdeo:c_trial_gender -6.162e-04 6.803e-04 4.493e+01 -0.906 0.369868
c_trial_congruency:c_trial_gender -2.543e-02 2.247e-02 7.591e+01 -1.132 0.261224
ResidIdeo:c_trial_congruency:c_trial_gender 1.302e-04 1.259e-03 4.463e+03 0.103 0.917656
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Correlation of Fixed Effects:
(Intr) ResdId c_trl_c c_trl_g sbj_._ log_ll lxm_nr RsdId:c_trl_c RsdId:c_trl_g c__:__
ResidIdeo 0.000
c_trl_cngrn -0.031 -0.003
c_tril_gndr 0.040 0.001 -0.345
sbjct_nfr._ -0.620 0.001 0.000 0.001
log_all -0.153 -0.001 0.221 -0.422 -0.001
lexeme_norm -0.735 -0.001 0.047 -0.083 -0.001 0.206
RsdId:c_trl_c -0.003 0.016 -0.002 -0.004 0.000 0.005 0.004
RsdId:c_trl_g 0.000 -0.082 -0.002 0.004 0.000 -0.005 0.000 0.080
c_trl_cn:__ 0.084 0.001 -0.128 0.364 0.001 -0.578 -0.114 -0.004 -0.024
RsdId:__:__ 0.005 0.000 -0.003 0.001 0.000 -0.009 -0.008 -0.004 -0.001 0.001
optimizer (nloptwrap) convergence code: 0 (OK)
Model failed to converge with max|grad| = 0.0921702 (tol = 0.002, component 1)
trans_residuals <- data.frame(
subject_means_w_party["workerid"],
ResidTrans = lm(gender_trans~subject_information.party_alignment, data=subject_means_w_party)$resid
)
final_spr <- left_join(final_spr,trans_residuals,by="workerid")
link_residuals <- data.frame(
subject_means_w_party["workerid"],
ResidLink = lm(gender_link~subject_information.party_alignment, data=subject_means_w_party)$resid
)
final_spr <- left_join(final_spr,link_residuals,by="workerid")
Same as model eight, but with gender transendence
model_nine <- lmer(resid_rt~ResidTrans*c_trial_congruency*c_trial_gender + subject_information.party_alignment + log_all + lexeme_norm + (1 + ResidTrans + c_trial_congruency|name) + (1 + c_trial_congruency + c_trial_gender|workerid) + (1 + c_trial_congruency + c_trial_gender|lexeme), data=final_spr)
boundary (singular) fit: see ?isSingular
summary(model_nine)
Linear mixed model fit by REML. t-tests use Satterthwaite's method ['lmerModLmerTest']
Formula: resid_rt ~ ResidTrans * c_trial_congruency * c_trial_gender + subject_information.party_alignment + log_all + lexeme_norm +
(1 + ResidTrans + c_trial_congruency | name) + (1 + c_trial_congruency + c_trial_gender | workerid) + (1 + c_trial_congruency + c_trial_gender | lexeme)
Data: final_spr
REML criterion at convergence: 3758
Scaled residuals:
Min 1Q Median 3Q Max
-4.0935 -0.5927 -0.0373 0.5257 4.7167
Random effects:
Groups Name Variance Std.Dev. Corr
workerid (Intercept) 1.470e-01 0.3833548
c_trial_congruency 1.988e-03 0.0445818 0.07
c_trial_gender 2.550e-03 0.0504970 -0.22 0.70
name (Intercept) 2.975e-04 0.0172492
ResidTrans 4.020e-08 0.0002005 1.00
c_trial_congruency 2.208e-04 0.0148586 1.00 1.00
lexeme (Intercept) 1.593e-03 0.0399168
c_trial_congruency 4.201e-03 0.0648160 -0.04
c_trial_gender 1.329e-03 0.0364620 -0.19 -0.64
Residual 9.551e-02 0.3090512
Number of obs: 5303, groups: workerid, 276; name, 24; lexeme, 20
Fixed effects:
Estimate Std. Error df t value Pr(>|t|)
(Intercept) 6.176e-02 9.225e-02 5.815e+01 0.669 0.50584
ResidTrans -5.178e-03 1.783e-03 2.729e+02 -2.904 0.00399 **
c_trial_congruency -4.625e-03 1.774e-02 2.108e+01 -0.261 0.79685
c_trial_gender -2.160e-02 1.554e-02 3.005e+01 -1.391 0.17457
subject_information.party_alignment -1.893e-02 1.830e-02 2.722e+02 -1.035 0.30176
log_all -6.578e-03 3.201e-03 6.059e+01 -2.055 0.04417 *
lexeme_norm -3.876e-04 1.899e-02 1.840e+01 -0.020 0.98394
ResidTrans:c_trial_congruency 1.083e-03 6.833e-04 2.879e+02 1.585 0.11407
ResidTrans:c_trial_gender -1.199e-04 6.974e-04 1.821e+02 -0.172 0.86369
c_trial_congruency:c_trial_gender -2.531e-02 2.231e-02 9.790e+01 -1.135 0.25927
ResidTrans:c_trial_congruency:c_trial_gender 5.902e-05 1.304e-03 4.452e+03 0.045 0.96391
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Correlation of Fixed Effects:
(Intr) RsdTrn c_trl_c c_trl_g sbj_._ log_ll lxm_nr RsdTrns:c_trl_c RsdTrns:c_trl_g c__:__
ResidTrans 0.001
c_trl_cngrn -0.030 0.003
c_tril_gndr 0.041 0.001 -0.348
sbjct_nfr._ -0.621 0.001 0.000 0.001
log_all -0.153 -0.001 0.223 -0.423 -0.001
lexeme_norm -0.734 -0.001 0.047 -0.083 -0.001 0.206
RsdTrns:c_trl_c -0.003 0.019 0.000 -0.003 0.000 0.004 0.004
RsdTrns:c_trl_g 0.001 -0.076 -0.002 0.053 -0.001 -0.002 -0.001 0.072
c_trl_cn:__ 0.085 0.000 -0.130 0.370 0.001 -0.584 -0.115 -0.002 0.029
RsdTr:__:__ 0.004 0.000 -0.001 0.000 0.000 -0.007 -0.006 -0.010 -0.005 0.003
optimizer (nloptwrap) convergence code: 0 (OK)
boundary (singular) fit: see ?isSingular
final_spr %>%
ggplot(aes(x= gender_trans, y=resid_rt)) +
geom_point() +
geom_smooth(method="lm")
`geom_smooth()` using formula 'y ~ x'
Same as model nine, but with gender link
model_ten <- lmer(resid_rt~ResidLink*c_trial_congruency*c_trial_gender + subject_information.party_alignment + log_all + lexeme_norm + (1 + ResidLink + c_trial_congruency|name) + (1 + c_trial_congruency + c_trial_gender|workerid) + (1 + c_trial_congruency + c_trial_gender|lexeme), data=final_spr)
boundary (singular) fit: see ?isSingular
Warning: Model failed to converge with 1 negative eigenvalue: -1.5e+01
summary(model_ten)
Linear mixed model fit by REML. t-tests use Satterthwaite's method ['lmerModLmerTest']
Formula: resid_rt ~ ResidLink * c_trial_congruency * c_trial_gender + subject_information.party_alignment + log_all + lexeme_norm +
(1 + ResidLink + c_trial_congruency | name) + (1 + c_trial_congruency + c_trial_gender | workerid) + (1 + c_trial_congruency + c_trial_gender | lexeme)
Data: final_spr
REML criterion at convergence: 3760.3
Scaled residuals:
Min 1Q Median 3Q Max
-4.1355 -0.5937 -0.0434 0.5306 4.7103
Random effects:
Groups Name Variance Std.Dev. Corr
workerid (Intercept) 1.467e-01 0.3829946
c_trial_congruency 1.852e-03 0.0430388 0.04
c_trial_gender 2.255e-03 0.0474868 -0.27 0.94
name (Intercept) 2.890e-04 0.0169992
ResidLink 1.965e-07 0.0004433 -0.17
c_trial_congruency 2.998e-04 0.0173159 0.82 -0.70
lexeme (Intercept) 1.575e-03 0.0396849
c_trial_congruency 4.289e-03 0.0654933 -0.07
c_trial_gender 1.353e-03 0.0367854 -0.17 -0.64
Residual 9.557e-02 0.3091381
Number of obs: 5303, groups: workerid, 276; name, 24; lexeme, 20
Fixed effects:
Estimate Std. Error df t value Pr(>|t|)
(Intercept) 6.184e-02 9.191e-02 5.931e+01 0.673 0.50368
ResidLink -3.769e-03 1.255e-03 2.710e+02 -3.004 0.00291 **
c_trial_congruency -4.803e-03 1.794e-02 2.100e+01 -0.268 0.79154
c_trial_gender -2.143e-02 1.549e-02 2.953e+01 -1.383 0.17702
subject_information.party_alignment -1.907e-02 1.827e-02 2.717e+02 -1.044 0.29727
log_all -6.572e-03 3.195e-03 6.064e+01 -2.057 0.04404 *
lexeme_norm -3.031e-04 1.889e-02 1.867e+01 -0.016 0.98737
ResidLink:c_trial_congruency 2.348e-04 4.787e-04 3.239e+02 0.490 0.62415
ResidLink:c_trial_gender -5.908e-04 5.154e-04 3.028e+01 -1.146 0.26065
c_trial_congruency:c_trial_gender -2.535e-02 2.260e-02 7.985e+01 -1.122 0.26533
ResidLink:c_trial_congruency:c_trial_gender 1.268e-04 9.171e-04 4.697e+03 0.138 0.89006
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Correlation of Fixed Effects:
(Intr) RsdLnk c_trl_c c_trl_g sbj_._ log_ll lxm_nr RsdLnk:c_trl_c RsdLnk:c_trl_g c__:__
ResidLink -0.001
c_trl_cngrn -0.032 -0.010
c_tril_gndr 0.040 0.001 -0.344
sbjct_nfr._ -0.622 0.001 0.000 0.001
log_all -0.152 -0.001 0.220 -0.424 -0.001
lexeme_norm -0.733 0.000 0.047 -0.083 -0.001 0.205
RsdLnk:c_trl_c -0.002 0.011 -0.003 -0.004 0.000 0.004 0.003
RsdLnk:c_trl_g -0.001 -0.080 -0.002 -0.028 0.000 -0.006 0.001 0.085
c_trl_cn:__ 0.084 0.000 -0.126 0.360 0.001 -0.575 -0.113 -0.004 -0.076
RsdLn:__:__ 0.005 0.000 -0.003 0.002 0.000 -0.008 -0.007 0.000 0.002 0.000
optimizer (nloptwrap) convergence code: 0 (OK)
boundary (singular) fit: see ?isSingular
final_spr %>%
ggplot(aes(x= gender_link, y=resid_rt)) +
geom_point() +
geom_smooth(method="lm")
`geom_smooth()` using formula 'y ~ x'
link_residuals <- data.frame(
frequency["workerid"],
ResidLink = lm(gender_link~subject_information.party_alignment, data=subject_means_w_party)$resid
)
final_spr <- left_join(final_spr,link_residuals,by="workerid")
final_spr <- final_spr %>%
model_eleven <- lmer(resid_rt~ResidIdeo * c_trial_gender + resid_lexeme_norm + log_all*poli_party(3_level) + (1 + ResidIdeo + resid_lexeme_norm + log_all*poli_party | name) + (1 + c_trial_gender + resid_lexeme_norm + log_all |workerid) + (1 + c_trial_gender + ResidIdeo + poli_party | lexeme))
final_spr <- final_spr %>%
mutate(norm_skew = ifelse(lexeme_norm > 4, "female","male"))
final_spr %>%
ggplot(aes(x=gender_link,y=gender_trans)) +
geom_point() +
geom_smooth(method="lm")
`geom_smooth()` using formula 'y ~ x'
final_spr %>%
ggplot(aes(x=gender_link,y=gender_total)) +
geom_point() +
geom_smooth(method="lm")
`geom_smooth()` using formula 'y ~ x'
final_spr %>%
ggplot(aes(x=gender_trans,y=gender_total)) +
geom_point() +
geom_smooth(method="lm")
`geom_smooth()` using formula 'y ~ x'
ggplot(final_spr, aes(x=gender_total, y=resid_rt, color=norm_skew)) +
geom_point() +
geom_smooth(method="lm")
`geom_smooth()` using formula 'y ~ x'
final_spr %>%
group_by(subject_information.party_alignment) %>%
summarize(gender_trans = mean(gender_trans)) %>%
ggplot(aes(x=subject_information.party_alignment,y=gender_trans)) +
geom_bar(stat="identity") +
geom_jitter(data=subject_means, aes(y=gender_trans,x=subject_information.party_alignment),height=0)
final_spr %>%
group_by(subject_information.party_alignment) %>%
summarize(mean_gender_link = mean(gender_link)) %>%
ggplot(aes(x=subject_information.party_alignment,y=mean_gender_link)) +
geom_bar(stat="identity")
Calculating Speaker Means by Condition
sprt_speaker_means <- sprt_data %>%
group_by(condition,poli_party,workerid) %>%
summarize(MeanRT=mean(resid_rt))
Condition Means with Participant Means
sprt_data %>%
group_by(condition,trial_gender) %>%
summarize(MeanRT = mean(resid_rt), CI.Low = ci.low(resid_rt), CI.High = ci.high(resid_rt)) %>%
mutate(YMin = MeanRT - CI.Low, YMax = MeanRT + CI.High) %>%
ggplot(aes(x=condition,y=MeanRT,color=trial_gender)) +
geom_point(size=3) +
geom_jitter(data = sprt_speaker_means, aes(y=MeanRT),alpha=.1,color='black') +
geom_errorbar(aes(ymin=YMin,ymax=YMax), width=.25) +
scale_color_manual(values = bran_palette, ) +
labs(x="Condition",y="Residual Reading Time", color="Trial Gender")
ggsave("sprt_all.png", width=7,height=5,path='/Users/branpap/Desktop/gender_processing/talks_and_papers/qp_paper/figures')
sprt_data %>%
group_by(condition,trial_gender,poli_party) %>%
summarize(MeanRT = mean(resid_rt), CI.Low = ci.low(resid_rt), CI.High = ci.high(resid_rt)) %>%
mutate(YMin = MeanRT - CI.Low, YMax = MeanRT + CI.High) %>%
ggplot(aes(x=condition,y=MeanRT,color=trial_gender)) +
geom_point(size=3) +
geom_jitter(data = sprt_speaker_means, aes(y=MeanRT),alpha=.1,color='black') +
geom_errorbar(aes(ymin=YMin,ymax=YMax), width=.25) +
scale_color_manual(values = bran_palette, ) +
labs(x="Condition",y="Residual Reading Time", color="Trial Gender") +
facet_wrap(~poli_party)
Reading Time by Gender Ideology
Calculating Speaker Means by Ideology
sprt_speaker_means_ideology <- sprt_data %>%
group_by(gender_total,workerid,trial_gender,trial_congruency,poli_party) %>%
summarise(meanrt = mean(resid_rt))
sprt_speaker_means_ideology %>%
filter(!is.na(poli_party)) %>%
ggplot(aes(x=gender_total,y=meanrt,color=trial_gender,linetype=trial_congruency)) +
geom_point() +
geom_smooth(method='lm') +
scale_color_manual(values = bran_palette, ) +
facet_wrap(~poli_party)
Reading Time on Neologisms
sprt_data %>%
filter(!is.na(poli_party)) %>%
group_by(gender_total,workerid,trial_gender,poli_party,condition) %>%
summarise(meanrt = mean(resid_rt)) %>%
ggplot(aes(x=gender_total,y=meanrt,color=trial_gender)) +
geom_point() +
geom_smooth(method='lm') +
scale_color_manual(values = bran_palette, ) +
facet_grid(condition~poli_party)
final_spr %>%
ggplot(aes(x))
sprt_data %>%
filter(!is.na(poli_party)) %>%
filter(trial_congruency == "neutral") %>%
group_by(gender_trans,workerid,trial_gender,poli_party) %>%
summarise(meanrt = mean(resid_rt)) %>%
ggplot(aes(x=gender_trans,y=meanrt,color=trial_gender)) +
geom_point() +
geom_smooth(method='lm') +
scale_color_manual(values = bran_palette, ) +
facet_wrap(~poli_party)
sprt_data %>%
filter(!is.na(poli_party)) %>%
filter(trial_congruency == "neutral") %>%
group_by(gender_link,workerid,trial_gender,poli_party) %>%
summarise(meanrt = mean(resid_rt)) %>%
ggplot(aes(x=gender_link,y=meanrt,color=trial_gender)) +
geom_point() +
geom_smooth(method='lm') +
scale_color_manual(values = bran_palette, ) +
facet_wrap(~poli_party)
sprt_data <- merge(sprt_data,lex_freqs,by="lexeme") %>%
mutate(mean_neutral = (sum(mean_left_neutral,mean_right_neutral))/2)
sprt_data %>%
filter(!is.na(poli_party)) %>%
filter(trial_congruency == "neutral") %>%
ggplot(aes(x=gender_total,y=resid_rt,color=trial_gender)) +
geom_point() +
geom_smooth(method='lm') +
scale_color_manual(values = bran_palette, ) +
labs(x="Gender Total",y="Residual Reading Time", color="Trial Gender")
ggsave("sprt_neutral_gt.png", width=7,height=5,path='/Users/branpap/Desktop/gender_processing/talks_and_papers/qp_paper/figures')
Reading Time by Item
sprt_data %>%
group_by(condition,trial_gender,trial_congruency,lexeme) %>%
summarize(MeanRT = mean(resid_rt), CI.Low = ci.low(resid_rt), CI.High = ci.high(resid_rt)) %>%
mutate(YMin = MeanRT - CI.Low, YMax = MeanRT + CI.High) %>%
ggplot(aes(x=condition,y=MeanRT,color=trial_gender,shape=trial_congruency)) +
geom_point(size=3) +
geom_errorbar(aes(ymin=YMin,ymax=YMax), width=.25) +
facet_wrap(~ lexeme) +
theme(axis.text.x = element_text(angle = 45, vjust = .7, hjust=.7)) +
scale_color_manual(values = bran_palette)
Whole-Party Means
sprt_data %>%
filter(!is.na(poli_party)) %>%
group_by(poli_party,condition,trial_gender,trial_congruency) %>%
summarize(MeanRT = mean(resid_rt), CI.Low = ci.low(resid_rt), CI.High = ci.high(resid_rt)) %>%
mutate(YMin = MeanRT - CI.Low, YMax = MeanRT + CI.High) %>%
ggplot(aes(x=condition,y=MeanRT,color=trial_gender,shape=trial_congruency)) +
geom_point(size=3) +
geom_errorbar(aes(ymin=YMin,ymax=YMax), width=.25) +
facet_wrap(~ poli_party, nrow = 1) +
theme(axis.text.x = element_text(angle = 45, vjust = .7, hjust=.7)) +
scale_color_manual(values = bran_palette) +
labs(x="Condition", y="Residual Reading Time", shape="Trial Congruency", color="Trial Gender")
ggsave("sprt_party.png", width=7,height=5,path='/Users/branpap/Desktop/gender_processing/talks_and_papers/qp_paper/figures')
Modelling
sprt_model <- final_spr %>%
mutate(c_gender_total = scale(gender_total)) %>%
mutate(cage = scale(subject_information.age)) %>%
mutate(mean_all = (mean_freq_left + mean_freq_right)/2) %>%
mutate(c_mean_all = scale(mean_all)) %>%
mutate(c_trial_congruency = as.numeric(as.factor(trial_congruency))-mean(as.numeric(as.factor(trial_congruency)))) %>%
mutate(c_trial_gender = as.numeric(as.factor(trial_gender))-mean(as.numeric(as.factor(trial_gender)))) %>%
mutate(c_indi_mean = scale(indi_mean))
complex_model <- lmer(resid_rt~c_trial_congruency + c_gender_total + poli_party + c_mean_all + c_indi_mean + (1|workerid) + (1|lexeme) + (1|name),data = sprt_model)
summary(complex_model)
final_spr %>%
filter(poli_party == "Republican") %>%
group_by(proliferate.condition,condition,trial_gender,trial_congruency) %>%
summarize(MeanRT = mean(resid_rt), CI.Low = ci.low(resid_rt), CI.High = ci.high(resid_rt)) %>%
mutate(YMin = MeanRT - CI.Low, YMax = MeanRT + CI.High) %>%
ggplot(aes(x=condition,y=MeanRT,color=trial_gender,shape=trial_congruency)) +
geom_point(size=3) +
geom_errorbar(aes(ymin=YMin,ymax=YMax), width=.25) +
facet_wrap(~ proliferate.condition, nrow = 1) +
theme(axis.text.x = element_text(angle = 45, vjust = .7, hjust=.7)) +
scale_color_manual(values = bran_palette) +
labs(x="Condition", y="Residual Reading Time", shape="Trial Congruency", color="Trial Gender")
spr_republicans <- sprt_model %>%
filter(poli_party == "Republican")
repub_model <- lmer(resid_rt ~ proliferate.condition + (1|workerid) + (1|name) + (1|lexeme),data=spr_republicans)
summary(repub_model)
Data Read-in
prod_data <- read.csv("production_data.csv")
Exclusions
prod_exclusion <- prod_data %>% filter(name=='attention') %>%
group_by(workerid) %>%
summarise(accuracy = mean(correct)) %>%
mutate(exclude = ifelse(accuracy < 0.80,'Yes','No')) %>%
filter(exclude == "Yes")
prod_data <- prod_data[!(prod_data$workerid %in% prod_exclusion$workerid),]
Additional Information
prod_data <- prod_data %>%
mutate(gender_trans = 100 - (rowMeans(prod_data[gender_transcendence_cols]))) %>%
mutate(gender_link = rowMeans(prod_data[gender_linked_cols]))
gender_all = c('gender_trans','gender_link')
prod_data <- prod_data %>%
mutate(gender_total = rowMeans(prod_data[gender_all]))
prod_data <- prod_data %>%
filter(type == "critical") %>%
mutate(response_gender = ifelse(response == "actress" | response == "anchorwoman" | response == "stewardess" | response == "businesswoman" | response == 'camerawoman' | response == 'congresswoman' | response == 'craftswoman' | response == 'crewwoman' | response == 'firewoman' | response == 'forewoman' | response == 'heiress' | response == 'heroine' | response == 'hostess' | response == 'huntress' | response == 'laywoman' | response == 'policewoman' | response == 'saleswoman' | response == 'stuntwoman' | response == 'villainess' | response == 'weatherwoman',"female",ifelse(response == "anchor" | response == "flight attendant" | response == "businessperson" | response == 'camera operator' | response == 'congressperson' | response == 'craftsperson' | response == 'crewmember' | response == 'firefighter' | response == 'foreperson' | response == 'layperson' | response == 'police officer' | response == 'salesperson' | response == 'stunt double' | response == 'meteorologist',"neutral",ifelse(response == "anchorman" | response == "steward" | response == "businessman" | response == 'cameraman' | response == 'congressman' | response == 'craftsman' | response == 'crewman' | response == 'fireman' | response == 'foreman' | response == 'layman' | response == 'policeman' | response == 'salesman' | response == 'stuntman' | response == 'weatherman',"male",'male/neutral')))) %>%
mutate(congruency = ifelse(gender == response_gender,"true","false")) %>%
mutate(neutrality = ifelse(response_gender == "neutral","true","false"))%>%
mutate(morph_type = ifelse(lexeme!= 'actor' & lexeme!= 'host' & lexeme !='hunter' & lexeme!= 'villain' & lexeme!= 'heir' & lexeme!= 'hero','compound','adoption')) %>%
mutate(poli_party = ifelse(subject_information.party_alignment == 1 | subject_information.party_alignment == 2,'Republican',ifelse(subject_information.party_alignment == 4 | subject_information.party_alignment == 5,'Democrat','Non-Partisan'))) %>%
mutate(response_neutral = ifelse(response_gender == "neutral" | response_gender == "male/neutral",1,0))
prod_final <- left_join(prod_data,norming_means_neutral,by="lexeme")
prod_final <- left_join(prod_final,real_dists,by="lexeme")
prod_final %>%
group_by(lexeme,indi_mean) %>%
summarize(mean_prop = mean(response_neutral)) %>%
ggplot(aes(x=indi_mean,y=mean_prop,label=lexeme)) +
geom_point() +
geom_text() +
geom_smooth(method="lm")
Responses by Political Ideology
prod_data %>%
filter(!is.na(poli_party)) %>%
filter(morph_type =="compound") %>%
ggplot(aes(x=poli_party, fill=response_gender)) +
geom_bar(position="fill") +
facet_wrap(~gender) +
scale_fill_manual(values = bran_palette) +
labs(x="Participant Political Party", fill="Gender of Response", y="Proportion of Responses", title="Gender of Response by Gender of Stimulus Name") +
theme(text=element_text(size=15)) +
theme(axis.text.x = element_text(angle=25))
ggsave("prod_all_poli.png", width=7,height=5,path='/Users/branpap/Desktop/gender_processing/talks_and_papers/qp_paper/figures')
prod_data %>%
filter(!is.na(subject_information.party_alignment)) %>%
filter(morph_type =="compound") %>%
ggplot(aes(x=subject_information.party_alignment, fill=response_gender)) +
geom_bar(position="fill") +
facet_wrap(~gender) +
scale_fill_manual(values = bran_palette) +
labs(x="Participant Political Party", fill="Gender of Response", y="Proportion of Responses", title="Gender of Response by Gender of Stimulus Name")
Gender of Response by Political Alignment and Gender Ideology
prod_data %>%
filter(!is.na(poli_party)) %>%
mutate(response_neutral = ifelse(response_gender == "neutral",1,0)) %>%
filter(gender!="filler" & gender!= "attention" & gender!="" & morph_type=="compound") %>%
group_by(gender,gender_total,poli_party) %>%
summarise(proportion = mean(response_neutral)) %>%
ggplot(aes(x=gender_total, y=proportion, color=gender)) +
geom_point() +
geom_smooth() +
scale_color_manual(values = bran_palette) +
facet_wrap(~poli_party) +
labs(x="Gender Ideology Score", y="Proportion of Gender Neutral Responses",color="Gender of Name Seen") +
theme(text=element_text(size=15))
ggsave("prod_neutral_poli.png", width=10,height=5,path='/Users/branpap/Desktop/gender_processing/talks_and_papers/qp_paper/figures')
prod_data %>%
filter(!is.na(poli_party)) %>%
mutate(response_neutral = ifelse(response_gender == "neutral",1,0)) %>%
filter(gender!="filler" & gender!= "attention" & gender!="") %>%
group_by(gender,subject_information.age,poli_party) %>%
summarise(proportion = mean(response_neutral)) %>%
ggplot(aes(x=subject_information.age, y=proportion, color=gender)) +
geom_point() +
geom_smooth() +
scale_color_manual(values = bran_palette)
prod_data %>%
filter(!is.na(poli_party)) %>%
mutate(response_neutral = ifelse(response_gender == "neutral",1,0)) %>%
filter(gender!="filler" & gender!= "attention" & gender!="") %>%
group_by(gender,workerid,poli_party) %>%
summarise(proportion = mean(response_neutral)) %>%
ggplot(aes(x=poli_party, y=proportion, fill=poli_party)) +
geom_boxplot(varwidth = T) +
scale_fill_manual(values=bran_palette) +
facet_wrap(~gender) +
theme(legend.position = "none") +
labs(x="Participant Political Party", y="Proportion",title="Mean Prop. of Neutral Responses by Stimuli Gender") +
theme(text=element_text(size=16)) +
theme(axis.text.x = element_text(angle=20))
ggsave("prod_neutral_poli_box.png", width=7, height=5,path='/Users/branpap/Desktop/gender_processing/talks_and_papers/qp_paper/figures')
Gender by Gender, no Ideology
prod_data %>%
filter(morph_type =="compound") %>%
ggplot(aes(x=gender, fill=response_gender)) +
geom_bar(position="fill") +
scale_fill_manual(values = bran_palette) +
labs(x="Stimulus Gender", fill="Gender of Response", y="Proportion of Responses", title="Gender of Response by Gender of Stimulus Name") +
theme_minimal() +
geom_errorbar(aes(ymin=))
Models
prod_data_compounds <- prod_data %>%
filter(morph_type == "compound") %>%
mutate(cgender_total = scale(gender_total)) %>%
mutate(response_congruency = as.numeric(ifelse(congruency=="true","1","0"))) %>%
mutate(cage = scale(subject_information.age)) %>%
mutate(neutrality_binary = ifelse(neutrality=="true",1,0))
final_dat <- merge(prod_data_compounds,lex_freqs,by="lexeme") %>%
mutate(neutrality_binary = ifelse(neutrality=="true",1,0)) %>%
filter(morph_type == "compound") %>%
mutate(cgender_total = scale(gender_total)) %>%
mutate(response_congruency = as.numeric(ifelse(congruency=="true","1","0"))) %>%
mutate(cage = scale(subject_information.age)) %>%
mutate(cmean_left_neutral = scale(mean_left_neutral)) %>%
mutate(mean_all = (mean_left_neutral + mean_right_neutral)/2) %>%
mutate(cmean_all = scale(mean_all))
production_model_one <- lmer(neutrality_binary~cgender_total + poli_party + gender + cmean_all + (1|workerid) + (1|lexeme) + (1|name),data=final_dat)
summary(production_model_one)
(table(prod_data$subject_information.gender))
prod_gender_table <- prod_data %>%
group_by(workerid,subject_information.gender,poli_party) %>%
summarise(subject_gender = paste(unique(subject_information.gender)))
table(prod_gender_table$subject_gender,prod_gender_table$poli_party)
prod_data_all <- read.csv("production_data.csv") %>%
filter(type=="filler_semantic" | type=="filler_grammatical") %>%
group_by(lexeme,type) %>%
summarise(lexeme=paste(unique(lexeme)))
table(prod_data_all$type)
participant ages <- final_spr %>%
Error: unexpected symbol in "participant ages"
participant_ages %>%
filter(!is.na(poli_party)) %>%
ggplot(aes(x=subject_information.age, fill=poli_party)) +
geom_density(alpha=.3, position="identity")
Warning: Removed 2 rows containing non-finite values (stat_density).
final_spr %>%
filter(!is.na(poli_party)) %>%
filter(!is.na(young_old)) %>%
filter(poli_party != "Non-Partisan") %>%
group_by(form,poli_party,young_old) %>%
mutate(resid_rt_mean = mean(resid_rt)) %>%
filter(log_all > -5) %>%
ggplot(aes(x=log_all,y=resid_rt_mean,label=form)) +
geom_point() +
geom_smooth(method="lm") +
geom_text(size=4,nudge_y =.03) +
facet_grid(young_old~poli_party)
`geom_smooth()` using formula 'y ~ x'
final_spr %>%
filter(!is.na(poli_party)) %>%
filter(!is.na(young_old)) %>%
filter(media_source > -5) %>%
group_by(form,poli_party,young_old) %>%
mutate(resid_rt_mean = mean(resid_rt)) %>%
filter(log_all > -5) %>%
ggplot(aes(x=media_source,y=resid_rt_mean,label=form)) +
geom_point() +
geom_smooth(method="lm") +
geom_text(size=4,nudge_y =.03) +
facet_grid(young_old~poli_party)
`geom_smooth()` using formula 'y ~ x'
final_spr %>%
filter(!is.na(poli_party)) %>%
filter(!is.na(young_old)) %>%
filter(poli_party != "Non-Partisan") %>%
filter(media_source > -5) %>%
group_by(form,poli_party,young_old) %>%
mutate(resid_rt_mean = mean(resid_rt)) %>%
ungroup() %>%
filter(log_all > -5) %>%
group_by(poli_party,young_old) %>%
summarise(mean = mean(media_source))
`summarise()` has grouped output by 'poli_party'. You can override using the `.groups` argument.
cors_window = temp %>%
group_by(poli_party,young_old) %>%
summarize(Correlation=round(cor.test(media_source,resid_rt_mean)$estimate,2),P=round(cor.test(media_source,resid_rt_mean)$p.value,5))
`summarise()` has grouped output by 'poli_party'. You can override using the `.groups` argument.
cors_window
cors_log_all = temp %>%
group_by(poli_party,young_old) %>%
summarize(Correlation=round(cor.test(log_all,resid_rt_mean)$estimate,2),P=round(cor.test(log_all,resid_rt_mean)$p.value,5))
`summarise()` has grouped output by 'poli_party'. You can override using the `.groups` argument.
cors_log_all
temp %>%
cor(media_source, resid_rt_mean)
Error in pmatch(use, c("all.obs", "complete.obs", "pairwise.complete.obs", :
object 'resid_rt_mean' not found
cor(temp$media_source,temp$resid_rt_mean)
[1] -0.1687425
table(dem_temp$poli_party,dem_temp$subject_information.age, na.rm=TRUE)
Error in table(dem_temp$poli_party, dem_temp$subject_information.age, :
all arguments must have the same length
table(final_spr$young_old,final_spr$poli_party)
Democrat Non-Partisan Republican
old 366 239 530
young 1829 895 1404
final_spr %>%
filter(!is.na(poli_party)) %>%
filter(!is.na(subject_information.age)) %>%
filter(trial_congruency == "neutral") %>%
filter(lexeme != "flight attendant") %>%
group_by(lexeme,trial_gender,poli_party,young_old) %>%
mutate(lex_mean = mean(resid_rt)) %>%
ggplot(aes(x=lexeme_norm,y=lex_mean, color=trial_gender,label=lexeme)) +
geom_point() +
geom_text() +
geom_smooth(method="lm") +
facet_grid(young_old~poli_party)
`geom_smooth()` using formula 'y ~ x'
final_spr %>%
filter(trial_congruency == "neutral") %>%
filter(lexeme != "flight attendant") %>%
ggplot(aes(x=lexeme_norm, y=log_all)) +
geom_point() +
geom_smooth(method="lm")
`geom_smooth()` using formula 'y ~ x'
final_spr %>%
filter(!is.na(poli_party)) %>%
filter(trial_congruency == "neutral") %>%
filter(lexeme != "flight attendant") %>%
mutate(freq_high_low = cut_interval(log_all,n=2,labels=c("low","high"))) %>%
ggplot(aes(x=lexeme_norm, y=log_all)) +
geom_point() +
geom_smooth(method="lm") +
facet_grid(freq_high_low~poli_party)
`geom_smooth()` using formula 'y ~ x'
final_spr %>%
filter(!is.na(poli_party)) %>%
filter(trial_congruency == "neutral") %>%
filter(lexeme != "flight attendant") %>%
mutate(freq_high_low = cut_interval(log_all,n=2,labels=c("low","high"))) %>%
group_by(lexeme,trial_gender,poli_party,freq_high_low,lexeme_norm) %>%
summarise(lex_mean = mean(resid_rt)) %>%
ggplot(aes(x=lexeme_norm, y=lex_mean,color=trial_gender)) +
geom_point() +
geom_smooth(method="lm") +
facet_grid(freq_high_low~poli_party)
`summarise()` has grouped output by 'lexeme', 'trial_gender', 'poli_party', 'freq_high_low'. You can override using the `.groups` argument.
`geom_smooth()` using formula 'y ~ x'
cors_poli_norm = temp_two %>%
group_by(poli_party,lexeme_norm) %>%
summarize(Correlation=round(cor.test(lexeme_norm,resid_rt_mean)$estimate,2),P=round(cor.test(lexeme_norm,resid_rt_mean)$p.value,5))
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
Warning in cor(x, y) : the standard deviation is zero
`summarise()` has grouped output by 'poli_party'. You can override using the `.groups` argument.
final_spr %>%
group_by(trial_gender,trial_congruency,morph_type) %>%
summarize(MeanRT = mean(resid_rt), CI.Low = ci.low(resid_rt), CI.High = ci.high(resid_rt)) %>%
mutate(YMin = MeanRT - CI.Low, YMax = MeanRT + CI.High) %>%
ggplot(aes(x=morph_type,y=MeanRT,color=trial_gender)) +
geom_point() +
geom_errorbar(aes(ymin=YMin,ymax=YMax), width=.25) +
facet_wrap(~trial_congruency)
`summarise()` has grouped output by 'trial_gender', 'trial_congruency'. You can override using the `.groups` argument.
It is my hope and intention that this color palette be color-blind friendly. If you have accessibility concerns, please do not hesitate to reach out to me!↩︎
This amounts to an hourly rate of $20.73. We originally anticipated that participants would take an average of 7 minutes to complete the experiment, and set the base pay at $15 an hour.↩︎